<template>
    <div>
         <div v-for="item in abstractDetail" :key="item.type">
             <h3 v-text="item.title" class="dialog-plate-title"></h3>
             <div v-html="item.content" class="htmlBox"></div>
         </div>
    </div>
</template>
<script>
import bloodKnowledgeApi from 'plugins/axios/bloodKnowledgeApi.js'
export default {

    props:{
        epKnowledId:{
            type:Number
        }
    },
    data(){
        return {
            pagination:{
                pageSize:10,
                currentPage:1,
                total:0
            },
            abstractDetail:[{
                title:'疾病概述',
                type:'1',
                content:''
            },
            {
                title:'流行病学',
                type:'2',
                content:''
            },
            {
                title:'医学经济学',
                type:'3',
                content:''
            },
            {
                title:'诊断标准',
                type:'4',
                content:''
            },
            {
                title:'评估标准',
                type:'10',
                content:''
            },
            {
                title:'传统治疗',
                type:'5',
                content:''
            },
            {
                title:'UBIO治疗',
                type:'11',
                content:''
            },
             {
                title:'副作用及应对',
                type:'6',
                content:''
            }]
        }
    },
    watch:{
        epKnowledId(newDetail,oldDetail){
            this.getAbstractList();
        }
    },
    mounted(){
        this.getAbstractList();
    },
    methods:{
        getAbstractList(){/**获取文献摘要列表 */
            let self = this;
            let data ={
                did:self.epKnowledId,
                pageSize:100,
                currentPage:1
            }
            bloodKnowledgeApi.abstractList(data).then(res=>{
                if(res.content.records&&res.content.records.length>0){
                    res.content.records.forEach(element => {
                        self.abstractDetail.forEach(item=>{
                            if(item.type===element.type){
                                item.content=element.content
                            }
                        })
                    });
                }
            })
        },



    }
}
</script>
<style scoped>
.dialog-plate-title{
    margin:16px 0;
}
</style>
